#ifndef WORKER0_H_
#define WORKER0_H_


#include <string>

class Worker
{
private:
    std::string fullname;
    long id;
public:
    Worker(): fullname("no one"), id(0L) {}
    Worker(const std::string & s, long n): fullname(s), id(n) {}
    virtual ~Worker() = 0; // 纯虚

    virtual void Set();
    virtual void Show() const;
};

class Waiter: public Worker
{
private:
    int panache;

public:
    Waiter(): Worker(), panache(0) {}
    Waiter(const std::string & s, long n, int p=0): Worker(s, n), panache(p) {}
    Waiter(const Worker & w, int p=0): Worker(w), panache(p) {}

    void Set();
    void Show() const;
};

class Singer: public Worker
{
protected:
    enum {other, alto, contralto, soprano, bass, baritone, tenor}; // 表示声音类型
    // alto 女中音 contralto 女低音 soprano 女高音 bass 男低音 baritone 男中音 tenor 男高音
    enum {Vtypes = 7};

private:
    static char *pv[Vtypes];
    int voice;

public:
    Singer(): Worker(), voice(other) {}
    Singer(const std::string & s, long n, int v = other): Worker(s, n), voice(v) {}
    Singer(const Worker & w, int v = other): Worker(w), voice(v) {}

    void Set();
    void Show() const;
};




#endif
